#ifndef GAMEENGINE_GRAPHICS_TRANSFORMATION_GL_TRANSFORMER3D_H
#define GAMEENGINE_GRAPHICS_TRANSFORMATION_GL_TRANSFORMER3D_H

#include <GameEngine/Graphics/graphics_settings.h>

#include <GameEngine/Geometry/CoordinateSystems/transformer3d.h>


#ifdef GAMEENGINE_NAMESPACES
namespace GameEngine {
#endif

//=================================================================================


//! Wrapper for OpenGL 3d transformation
/*!
 *  This class allows to manipulate local coordinate systems using OpenGL modelview matrices
 *  rather than on the CPU.
 *
 @note This class must always be manipulated AFTER a valid OpenGL context has been created. If
       no OpenGL context is available, any call to any function of this class will result in
	   an application crash.
 */
class _Graphics_decl GLTransformer3d : public Transformer3d<float> {

public:
	GLTransformer3d();
	GLTransformer3d(const Point3d<float>& from1, const Point3d<float>& from2, const Point3d<float>& from3, const Point3d<float>& from4,
		const Point3d<float>& to1, const Point3d<float>& to2, const Point3d<float>& to3, const Point3d<float>& to4);
	GLTransformer3d(const GLTransformer3d& rhs);
	virtual ~GLTransformer3d();
	GLTransformer3d& operator=(const GLTransformer3d& rhs);

	void apply_transformation();
	void remove_transformation();
};

#ifdef GAMEENGINE_NAMESPACES
} // namespace GameEngine
#endif

#endif
